home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ccccpppprrrroooodddd3333dddd,,,,zzzzpppprrrroooodddd3333dddd((((3333FFFF)))) ccccpppprrrroooodddd3333dddd,,,,zzzzpppprrrroooodddd3333dddd((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- ccccpppprrrroooodddd3333dddd,,,, zzzzpppprrrroooodddd3333dddd ---- Compute the product of a 3D Fourier transforms with a
- 3D filter.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccpppprrrroooodddd3333dddd(((( nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,aaaarrrrrrrraaaayyyy,,,,llllaaaa1111,,,,llllaaaa2222,,,,ffffiiiilllltttteeeerrrr,,,,llllffff1111,,,,llllffff2222))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,llllaaaa1111,,,,llllaaaa2222,,,,llllffff1111,,,,llllffff2222
- ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333)))),,,, ffffiiiilllltttteeeerrrr((((llllffff1111,,,,llllffff2222,,,,nnnn3333))))
-
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzpppprrrroooodddd3333dddd(((( nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,aaaarrrrrrrraaaayyyy,,,,llllaaaa1111,,,,llllaaaa2222,,,,ffffiiiilllltttteeeerrrr,,,,llllffff1111,,,,llllffff2222))))
- iiiinnnntttteeeeggggeeeerrrr nnnn1111,,,,nnnn2222,,,,nnnn3333,,,,llllaaaa1111,,,,llllaaaa2222,,,,llllffff1111,,,,llllffff2222
- ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((llllaaaa1111,,,,llllaaaa2222,,,,nnnn3333)))),,,, ffffiiiilllltttteeeerrrr((((llllffff1111,,,,llllffff2222,,,,nnnn3333))))
-
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt ccccpppprrrroooodddd3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,,
- iiiinnnntttt llllaaaa2222,,,, ccccoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt llllffff1111,,,, iiiinnnntttt llllffff2222))));;;;
- iiiinnnntttt zzzzpppprrrroooodddd3333dddd((((iiiinnnntttt nnnn1111,,,,iiiinnnntttt nnnn2222,,,,iiiinnnntttt nnnn3333,,,,zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt llllaaaa1111,,,,
- iiiinnnntttt llllaaaa2222,,,, zzzzoooommmmpppplllleeeexxxx ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt llllffff1111,,,, iiiinnnntttt llllffff2222))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- ccccpppprrrroooodddd3333dddd and zzzzpppprrrroooodddd3333dddd compute the product of the Fourier transforms of 3D
- complex sequence (size N1xN2xN3) with the Fourier transform of 3D filter.
- Note, the product of the Fourier transforms of two sequences is equal to
- the Fourier transform of their convolution.
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN1111 Integer, the first dimension size of the 3D sequence.
- Unchanged on exit.
-
- NNNN2222 Integer, the second dimension size of the 3D sequence.
- Unchanged on exit.
-
- NNNN3333 Integer, the thrid dimension size of the 3D sequence.
- Unchanged on exit.
-
- AAAARRRRRRRRAAAAYYYY Array containing the samples of the 3D sequence to be transformed.
- On input, the element {i,j,k} of the sequence is stored as A(i,j,k) in
- _F_o_r_t_r_a_n , and A[i+j*la1+k*la1*la2] in _C.
- On exit, the array is overwritten.
-
- LLLLAAAA1111 Integer, first leading dimension: increment between the samples of
- two consecutive 1D sub-sequences (e.g between {i,j+1,k} and {i,j,k} ).
- Unchanged on exit.
-
- LLLLAAAA2222 Integer, second leading dimension: number of the 1D sub-sequence
- between two consecutive 2D sub-sequences (e.g between {i,j,k+1} and
- {i,j,k}). Unchanged on exit.
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ccccpppprrrroooodddd3333dddd,,,,zzzzpppprrrroooodddd3333dddd((((3333FFFF)))) ccccpppprrrroooodddd3333dddd,,,,zzzzpppprrrroooodddd3333dddd((((3333FFFF))))
-
-
-
- FFFFIIIILLLLTTTTEEEERRRR Array containing the Fourier Transform of the 3D filter.
- Unchanged on exit.
-
- LLLLFFFF1111 Integer, filter array first leading dimension. Unchanged on exit.
-
- LLLLFFFF2222 Integer, filter array second leading dimension. Unchanged on exit.
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- Given a real sequence of size 100x64x125. We apply successvely the
- Direct FFT, the Inverse FFT, and scale back. The elements of each
- sequence are stored with increment (stride) 1,
- _F_o_r_t_r_a_n
- complex array(0:100-1,0:64-1,0:125-1)
- complex filter(0:100-1,0:64-1,0:125-1),
- complex coeff(100+15 + 64+15 + 125+15)
- call cfft3di( 100, 64, 125, coeff)
- call cfft3d( -1, 100, 64, 125, array, 100, 64, coeff)
- ccccaaaallllllll ccccpppprrrroooodddd3333dddd(((( 111100000000,,,,66664444,,,,111122225555,,,,aaaarrrrrrrraaaayyyy,,,,111100000000 ,,,,66664444,,,,ffffiiiilllltttteeeerrrr,,,,111100000000,,,,66664444))))
- call cfft3d( 1, 100, 64, 125, array, 100, 64, coeff)
-
- _C
- #include <fft.h>
- complex array[100*64*125], filter[100*64*125], *coeff;
- coeff = cfft3di( 100, 64, 125, NULL);
- cfft3d( -1, 100, 64, 125, array, 100, 64, coeff);
- ccccpppprrrroooodddd3333dddd(((( 111100000000,,,, 66664444,,,, 111122225555,,,, aaaarrrrrrrraaaayyyy,,,, 111100000000,,,, 66664444,,,, ffffiiiilllltttteeeerrrr,,,, 111100000000))));;;;
- cfft3d( -1, 100, 64, 125, array, 100, 64, coeff);
-
- NNNNOOOOTTTTEEEE :::: As the FFTs are not normalized, a successive direct, then inverse
- transform, scales the original input by the size of the sequence. Rather
- than calling cscal3d or zscal3d to scale back the result, this scaling
- factor could be directly applied to the filter transform, thus saving
- some extra work.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, cfft3di, zfft3di, cfft3d, zfft3d, cscal3d, zscal3d
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-